package com.kevin.thread;

import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.FutureTask;

public class ImplementCallableTest {
    public static void main(String[] args) throws ExecutionException, InterruptedException {
        FutureTask<String> task = new FutureTask<>((Callable<String>) () -> {
            return "lambda";
        });
        Thread thread = new Thread(task);
        thread.start();
        System.out.println(task.get());
    }
}


